import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: 'place',
        name: 'Place',
        component: () => import('../views/Place')
      },
      {
        path: 'food',
        name: 'Food',
        component: () => import('../views/Food')
      }
    ]
  }

]

const router = new VueRouter({
  routes,
  mode: 'history'
})

export default router
